package wxk.interview.servlet;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author wangxuekai
 * @version 2.2
 * @Date 2017/3/7.
 * @since 2.2
 */
@WebServlet(name = "MyDispatcherServlet",urlPatterns = "/myDispatcherServlet")
public class MyDispatcherServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        RequestDispatcher rd = req.getRequestDispatcher("/mySimpleServlet");
        rd.forward(req,resp);
    }
}
